def is_leap_year(year: int) -> bool:
    if ((year % 4 == 0 and year % 100 != 0) or year % 400 == 0) and (year >= 1582):
        return True
    else:
        return False


# ===========================
# Вариант 2 решения задачи
year = 1583
print(((year % 4 == 0 and year % 100 != 0) or year % 400 == 0) and (year >= 1582))